﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;

namespace SSOServer.Config
{
    public class SiteElementCollection : ConfigurationElementCollection
    {
        protected override string ElementName
        {
            get
            {
                return "site";
            }
        }

        public override ConfigurationElementCollectionType CollectionType
        {
            get
            {
                return ConfigurationElementCollectionType.BasicMap;
            }
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((SiteElement)element).SiteID;
        }

        protected override ConfigurationElement CreateNewElement()
        {
            return new SiteElement();
        }

        public new SiteElement this[string siteId]
        {
            get
            {
                return BaseGet(siteId) as SiteElement;
            }
        }
    }
}